<?php $this->placeholder('onReady')->captureStart() ?>
    $('#<?= $this->id_tablesorter?>').tablesorter();
    

    $("textarea.idioma").change(function () {
            var valor = $('#'+this.id).val();
            valor=valor.split(',').join('.')

            $.post('/translate/editar',{valor:this.value,id:this.id,idioma:'<?=$this->locale?>'}, function(data){
                if(data.status=='ok')
                {
                    $('.tr_'+data.id+ ' td.status').html('<img src="/img/agt_action_success.png"/>')
        		}else{
                    $('.tr_'+data.id+ ' td.status').html('<img src="/img/cancel.png"/> Error')
        		}
                
            });
    })

    
    
<?php $this->placeholder('onReady')->captureEnd() ?>


<table id="<?= $this->id_tablesorter?>"> 
	<thead>
		<tr>
			<th width="30%"><?php echo $this->translate('Español');?></th> 
            <th><?php echo $this->translate($this->idioma);?></th> 
            <th></th>
    	</tr>
    </thead>
    <tbody>
    <?foreach($this->rows as $row):?>
        <tr class="tr_<?php echo $row['id']?>">
            <td><?=$row['es_ES']?></td>
            <td><textarea class="idioma" cols="80" id="<?=$row['id']?>"><?=$row[$this->locale]?></textarea></td>
            <td class="status"></td>
           	<td><?=$this->BorrarFila('translate',$row['id'])?></td>
        </tr>
    <?endforeach?>
    </tbody>

</table>